home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1170 < prev    next >
Encoding:
Text File  |  1996-08-06  |  968 b   |  28 lines

  1. Newsgroups: comp.lang.c++
  2. Path: news3.noc.netcom.net!zdc!zippo!usenet
  3. From: Jim McFarland <jgm6@orkand.em.cdc.gov>
  4. Subject: Re: void pointers
  5. Content-Type: text/plain; charset=us-ascii
  6. Sender: usenet@news.zippo.com
  7. Content-Transfer-Encoding: 7bit
  8. Nntp-Posting-Host: 158.111.166.77
  9. Organization: The Orkand Corporation
  10. Message-ID: <DKx55F.1D4@news.zippo.com>
  11. References: <Pine.SUN.3.91.960105113409.18158A-100000@phoenix.acms.arizona.edu>
  12. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  13. Mime-Version: 1.0
  14. Date: Tue, 9 Jan 1996 14:48:51 GMT
  15.  
  16. Kenton White <jwhite@phoenix.acms.arizona.edu> wrote:
  17. >
  18. >
  19. >I am trying to create a class that stores pointers to other classes in an
  20. >array of void pointers.  Since void pointers cannot be dereferenced, is
  21. >there any way to cast the void pointer to a non-void pointer and then
  22. >dereference? 
  23. >
  24.  
  25. Since you are trying to create a container class, what you need to do is 
  26. to use polmorphism and avoid using void pointers all together.
  27.  
  28.